<include file="__THEME__/header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script type="text/javascript" src="{:U('weibo/plugins/init')}"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.autocomplete.js"></script>

<div class="content"><!-- 内容 begin  --> 
  <include file="__THEME__/blog_menu" />
  <div class="main">
    <div class="mainbox">
      <div class="mainbox_C">
        <div class="feedBox">
          <ul class="feed_list">
		  <php>if($list){</php>
            <volist name="list" id="vo">
              <li class="lineD_btm" id="list_{$vo['weibo_id']}">
                <div class="userPic">
                  <space uid="vo.uid" >{uavatar}</space>
                </div>
                <div class="feed_c">
                  <a href="{:U('home/space',array('uid'=>$vo['from_uid']))}">{$vo['from_uname']}</a>
                  <h1 class="f14px fB">{$vo['title']}</h1>
                  {$vo.content} 
                  
                  <php>if($vo['blog_id']){</php>
                <div class="feed_c_btm"> <cite> <a href="{:U('home/space/blog',array('uid'=>$vo['uid'],'id'=>$vo['weibo_id']))}">未完，继续阅读>></a>&nbsp;&nbsp;&nbsp;&nbsp;</cite> </div><php>}</php>
                
        <php>if($vo['tag']){</php>
                <div class="feed_c_btm">
                  <volist name="vo['tag']" id="tag"> <a href="{:U('home/Blog/myblog',array('k'=>$tag))}">#{$tag}</a>&nbsp;&nbsp;&nbsp;&nbsp; </volist>
                </div>
                <php>}</php>
                <div class="feed_c_btm"> <span class="right">
                  <php>if( $vo['uid'] == $mid ){</php>
                  <a href="{:U('home/Blog/edit', array('id'=>$vo['weibo_id']))}">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="javascript:void(0)" onclick="ui.confirm(this,'确认要删除这篇文章?')" callback="Deleted({$vo['weibo_id']})">删除</a>&nbsp;&nbsp;|&nbsp;&nbsp;
                  <php>}</php>
                  <a href="javascript:void(0)" rel="comment" minid="{$vo.id}" >评论({$vo.comment})</a> </span> <cite>{$vo.ctime|friendlyDate}</cite> </div>        
                
                
                  </div>   
              </li>
            </volist>
			<php>}else{</php>
			<li>无数据</li>
			<php>}</php>
          </ul>
          <div class="page">{$page}</div>
        </div>
        <div class="c"></div>
      </div>
    </div>
  </div>
</div>
<!-- 内容 end --> 

<script>

function Deleted(wb_id){
    $.post(U('home/Blog/doDel'),{wb_id:wb_id},function(rel){
	    if(rel==1){
		$('#list_'+wb_id).remove();
		ui.success('删除成功');
		ui.box.close();
		}else if(rel==-1){
		ui.error('文章不存在或者已经删除');		
		}else{
		ui.error('删除失败');			
		}
	
	});	
}

</script>
<include file="__THEME__/footer" /> 